{% extends "base.html"%}
{% block container %}
<div id='blog-add'>
	<form method='post' action='/blog/add1/'>
		<div>{{ form.title }}</div>
		{% if form.errors %}
			<div class='error-msg-add-blog'>
				<div class='help-block'>{{ form.title.errors }}</div>
			</div>
		{% endif %}
		<div>{{ form.timestamp }}</div>
		{% if form.errors %}
			<div class='error-msg-add-blog'>
				<div class='help-block'>{{ form.body.errors }}</div>
			</div>
		{% endif %}
		<div>{{ form.body }}</div>
		<div id='blog-add-btn'>
			<div class='blog-btn blog-btn-submit'>
				<button>发布</button>
			</div>
			<div class='blog-btn blog-btn-cancle'>
				<button><a href='/blog/list/type=new/'>取消</a></button>
			</div>
			<div>
				{% if error %}
					<p style='color:red;'>{{ error }}</p>
				{% endif %}
			</div>
		</div>
	</form>
</div>
{% endblock %}

